<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %> 
<%
	int bookid=Integer.parseInt(request.getParameter("bookid"));
	//out.println(bookid);
	List<Integer> cart=(List<Integer>)session.getAttribute("MyCart");
	if(cart==null){
		cart=new ArrayList<Integer>();
		session.setAttribute("MyCart", cart);
	}
	cart.add(bookid);
	//response.sendRedirect("Cart.jsp");

%>